package com.shisan.tingshu.order.client;

import com.shisan.tingshu.common.result.Result;
import com.shisan.tingshu.model.order.OrderInfo;
import com.shisan.tingshu.order.client.impl.OrderInfoDegradeFeignClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * <p>
 * 产品列表API接口
 * </p>
 *
 * @author qy
 */
@FeignClient(value = "service-order", fallback = OrderInfoDegradeFeignClient.class)
public interface OrderInfoFeignClient {

    /**
     * 根据订单号查询订单信息
     * @param orderNo
     * @param userId
     * @return
     */
    @GetMapping("/api/inner/orderinfo/getOrderInfoByOrderNo/{orderNo}/{userId}")
    Result<OrderInfo> getOrderInfoByOrderNo(@PathVariable(value = "orderNo") String orderNo, @PathVariable(value = "userId") Long userId);
}